package com.nfIt;

import com.nfIt.service.Bookservice;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClossName:App01
 * Pakage:com.nfIt
 * Description
 *
 * @Author L
 * @Create 2024/4/22 19:31
 * @Version 2023.1.3
 */
public class App01 {
    public static void main(String[] args) {
        //获取容器
        // ApplicationContext的实现类 =》 ClassPathXmlApplicationContext
        ApplicationContext cat = new ClassPathXmlApplicationContext("applicationContext.xml");

        //获取bean
        Bookservice bookService = (Bookservice) cat.getBean("service");
        bookService.say();
    }
}
